home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_200 / 273_01 / getcur.cc < prev    next >
Encoding:
C/C++ Source or Header  |  1987-11-03  |  429 b   |  17 lines

  1. #include <dos.h>
  2. get_cur(int *row, int *col)
  3. /* return the current cursor location into row,col.
  4.    If the cursor is hidden return value will be 1 else 0 will be returned.    
  5. */
  6. {
  7.         union REGS inregs;
  8.         inregs.h.bh=0; inregs.h.ah=3;
  9.         int86(0x10,&inregs,&inregs);
  10.         *row=inregs.h.dh;
  11.         *col=inregs.h.dl;
  12.         if(inregs.h.ch & 0x20)
  13.             return(1);
  14.         else
  15.             return(0);
  16. }
  17.